package com.jfl.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jfl.model.SysUserPost;

/**
 * 使用mybatis-plus BaseMapper 非封装
 *  
 * @author  赵炎
 * @version  [V1.00, 2018年12月25日]
 * @since V1.00
 */
public interface SysUserPostMapper extends BaseMapper<SysUserPost>
{

    @Delete("delete from tbl_sys_user_post where user_id = #{userId}")
    int deleteByUserId(Long userId);

    @Select("select count(1) from tbl_sys_user_post where post_id = #{postId}")
    int countByPostId(Long postId);
}
